function animate(dom,prop,value,callback){      
    clearInterval(dom.timer);
    dom.timer = setInterval(function(){
        var target = parseInt(value);
        var cur = parseInt(getComputedStyle(dom)[prop]);
        var speed = (target - cur) / 5;
        speed = speed > 0 ? Math.ceil(speed) : Math.floor(speed);

        if(cur == target){
            clearInterval(dom.timer);
            if(typeof callback == "function"){
                callback();
            }
            return ;
        }
        dom.style[prop] = cur + speed +"px";
    },30)
}